package homework.day10;

import java.util.Collection;
import java.util.HashSet;
import java.util.Random;

/**
 * 生成10个0-100之间的不重复的随机数,并输出
 * @author Xiloer
 *
 */
public class Test03 {
	public static void main(String[] args) {
		Random rand = new Random();
		Collection<Integer> c = new HashSet<>();
		while(c.size()<=10){
			c.add(rand.nextInt(100));
		}
		for(int i:c){
			System.out.println();
		}
		System.out.println(c);

	}
}
